RRCLIB_HOME=../rrclib

NBROKERLIB_HOME=../nbrokerlib
NBROKERLIB_INC=-I$(NBROKERLIB_HOME)
NBROKERLIB_LIB=$(NBROKERLIB_HOME)/libnbroker.a #-L$(NBROKERLIB_HOME) -lnbroker

NBPF_HOME=../../nbpf

INCLUDES=$(NBROKERLIB_INC) -I$(RRCLIB_HOME)/include -I$(NBPF_HOME)
LIBS=$(NBROKERLIB_LIB) -lpthread -lm -ldl -lzmq
CFLAGS=-g -Wall $(INCLUDES)

.PHONY: all clean
all: api-example

clean:
	rm -f *.o *.a
	rm -f api-example

nbrokerlib:
	cd $(NBROKERLIB_HOME); make

api-example: nbrokerlib api-example.o
	${CC} $(CFLAGS) api-example.o $(LIBS) -o api-example
